import request from '@/utils/request'

// 查询处方子prescription_item列表 (分页)
export function selectPagePrescriptionItem(query) {
    return request({
        url: '/business/prescriptionItem/selectPage',
        method: 'get',
        params: query
    })
}

// 查询处方子prescription_item列表 (不分页)
export function listPrescriptionItem(query) {
    return request({
        url: '/business/prescriptionItem/list',
        method: 'get',
        params: query
    })
}

// 历史处方主表行点击事件
export function historyApplyQuote(query) {
    return request({
        url: '/business/prescriptionItem/historyApplyQuote',
        method: 'get',
        params: query
    })
}

// 查询处方子prescription_item详细
export function getPrescriptionItem(itemId) {
    return request({
        url: '/business/prescriptionItem/' + itemId,
        method: 'get'
    })
}

// 新增处方子prescription_item
export function addPrescriptionItem(data) {
    return request({
        url: '/business/prescriptionItem',
        method: 'post',
        data: data
    })
}

// 修改处方子prescription_item
export function updatePrescriptionItem(data) {
    return request({
        url: '/business/prescriptionItem',
        method: 'put',
        data: data
    })
}

// 删除处方子prescription_item
export function delPrescriptionItem(itemId) {
    return request({
        url: '/business/prescriptionItem/' + itemId,
        method: 'delete'
    })
}
// 查询处方子prescription_item列表集合map
export function listPrescriptionItemMap(data) {
    return request({
        url: '/business/prescriptionItem/listPrescriptionItemMap',
        method: 'post',
        data: data
    })
}

// 确认发放
export function grantInfoOk(data) {
    return request({
        url: '/business/prescriptionItem/grantInfoOk',
        method: 'post',
        data: data
    })
}

// 确认退药
export function issuedGrantInfoOk(data) {
    return request({
        url: '/business/prescriptionItem/issuedGrantInfoOk',
        method: 'post',
        data: data
    })
}
